package cm.server.dao;

import cm.server.entity.PeopleResidence;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zy
 * @description
 * @date 2021/4/14 14:56
 */
public interface PeopleResidenceRepository extends JpaRepository<PeopleResidence, Long> {
    @Query(value = "select * from people_residence where user_id=?1 and day=?2 order by enter_time, leave_time",
            nativeQuery = true)
    List<PeopleResidence> findTrackByUserId(int user_id, int day);
}

